import BaseApi from '../BaseApi';

const controller = "/carType";

export default {

    getCarTypeList(condition) {
        return this.requestGet(controller, "/getCarTypeList", condition);
    },

    addCarType(condition) {
        return this.requestPost(controller, "/addCarType", condition);
    },

    delCarType(condition) {
        let id = condition.id;
        return this.requestGet(controller, "/delCarType/" + id);
    },



    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },


}
